package com.bxx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bxx.common.dto.CommentDto;
import com.bxx.entity.Comment;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CommentMapper extends BaseMapper<Comment> {
    @Select("SELECT `m_comment`.*,`m_tourist`.`name` FROM `m_comment`,`m_tourist` WHERE `m_comment`.`tourist_id`=`m_tourist`.`id` and `status`=1 and `blog_id`=#{blogId}")
    List<CommentDto> getCommentInfo(Page<CommentDto> page, Integer blogId);
}
